<template>
  <div>
    <van-cell class="card">
      <div class="fb">{{ form.Name }}</div>
      <div>修订人：{{ form.CreateChnName || "无" }}</div>
    </van-cell>
    <van-cell class="card">
      <van-tag class="title-tag mb-20" type="primary" size="large" mark
        >A、事故风险分析</van-tag
      >
      <div>事故类型：{{ form.AccidentName }}</div>
      <div class="mt-10">风险点：{{ form.Position }}</div>
      <div class="mt-10">严重程度：{{ form.Severity }}</div>
      <div class="mt-10">发生事故的时间：{{ form.AccidentTime }}</div>
      <div class="mt-10">影响范围：{{ form.AffectiveScopeName }}</div>
      <div class="mt-10">可能的衍生事故：{{ form.DerivativeAccidentName }}</div>
      <div class="mt-10">可能联动范围：{{ form.LinkageScopeName }}</div>
    </van-cell>
    <van-cell class="card">
      <van-tag class="title-tag mb-20" type="primary" size="large" mark
        >B、应急工作职责</van-tag
      >
      <div>发现者：{{ form.FinderResponsibility }}</div>
      <div class="mt-10">现场管理者：{{ form.SiteManagerResponsibility }}</div>
    </van-cell>
    <van-cell class="card">
      <van-tag class="title-tag mb-20" type="primary" size="large" mark
        >C、应急处置</van-tag
      >

       <div>事发前预警信息(征兆)：{{ form.PrewarningSigns }}</div>
      <div class="mt-10">预警信息处置措施：{{ form.PrewarningDisposalMeasures }}</div>

      <div
        class="mt-10 gray-border"
        v-for="(item, index) in form.Details"
        :key="index"
      >
        <div>序号：{{ item.No }}</div>
        <div>步骤：{{ item.Step }}</div>
        <div>执行人：{{ item.Executor }}</div>
        <div>解释：<span v-html="$options.filters.enterToBr(item.Explanation,{})"></span></div>
      </div>
    </van-cell>
    <van-cell class="card">
      <van-tag class="title-tag mb-20" type="primary" size="large" mark
        >D、注意事项</van-tag
      >

      <div><span v-html="$options.filters.enterToBr(form.Remarks,{})"></span></div>

    </van-cell>
  </div>
</template>

<script>
import { getPlanSiteDisposalPlanDetail } from "@/api/plan";
export default {
  components: {},
  data() {
    return {
      baseUrl: process.env.VUE_APP_BASE_API,
      id: this.$route.query.id,
      code: this.$route.query.code,
      form: {},
    };
  },
  created() {
    this.geDetail();
  },
  methods: {
    // 获取详情
    geDetail() {
      getPlanSiteDisposalPlanDetail({ id: this.id, code: this.code }).then(
        (res) => {
          this.form = res.data;
        }
      );
    },
  },
};
</script>

<style lang="less" scoped>

.gray-border{
  border:1px solid #ccc;
  padding: 10px;
}

</style>
